import pickle


def save_obj(obj, save_path):
    # 保存对象到文件
    with open(save_path, "wb") as f:
        pickle.dump(obj, f)


def load_obj(filename):
    # 从文件中加载对象
    with open(filename, "rb") as f:
        loaded_obj = pickle.load(f)
        return loaded_obj
